package com.zjg.dbutills;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import org.junit.Test;

import com.zjg.db.utills.DBConnection;

public class DBConnetiontest {

	
	@Test
public void test() throws SQLException {
	DBConnection a=new DBConnection();
	Connection connection=a.getConnection();
	Statement stm=connection.createStatement();
	ResultSet rs=stm.executeQuery("select * from hobby");
	while(rs.next()) {
		System.out.println(rs.getInt(1)+rs.getString(2)+rs.getString(3));
	}
	a.closeConnection(connection);
	
}


}
